#include <stdlib.h>
#include <string.h>
#include <stdio.h>

#include <TabLite.h>

static TabError tabErrorCode = TAB_ERROR_OK;
static const char *tabErrorStr[] = 
{
    "No Error",
    "Invalid Argument",
    "No Enough Memory",
    "Not Found",
    "Any Fault"
};

void TabErrorSet(TabError err)
{
    if (err < TAB_ERROR_OK || err >= TAB_ERROR_NR)
        return;
    tabErrorCode = err;
}

char *TabErrorGet()
{
    return (char *)tabErrorStr[tabErrorCode];
}